﻿using System;

using NUnit.Framework;
using Spring.Testing.NUnit;
using VisualAgile.Model;
using VisualAgile.IBLL;

namespace VisualAgile.UnitTest
{
    [TestFixture]
    public  class StoryManagerTest :AbstractTransactionalDbProviderSpringContextTests
    {
        protected override string[] ConfigLocations
        {
            get
            {
                return new String[] { "objects.xml" };
            }
        }

        protected IStoryManager StoryManager
        {
            get
            {
                return applicationContext.GetObject("StoryManagerTrans") as IStoryManager;
            }
        }

        [Test]
        public void SaveStoryTest()
        {
            Story story = StoryManager.NewStory();                        
            story.Name = "User Story";

            StoryManager.Save(story);
            transactionManager.Commit(transactionStatus);
        }
    }
}
